\hypertarget{class_lib_u_s_b_1_1_transfer_impl}{\section{Lib\-U\-S\-B\-:\-:Transfer\-Impl Class Reference}
\label{class_lib_u_s_b_1_1_transfer_impl}\index{Lib\-U\-S\-B\-::\-Transfer\-Impl@{Lib\-U\-S\-B\-::\-Transfer\-Impl}}
}


Base U\-S\-B \hyperlink{class_lib_u_s_b_1_1_transfer}{Transfer} implementation.  




{\ttfamily \#include $<$Transfer\-Impl.\-h$>$}



Inheritance diagram for Lib\-U\-S\-B\-:\-:Transfer\-Impl\-:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{class_lib_u_s_b_1_1_transfer_impl__inherit__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{class_lib_u_s_b_1_1_transfer_impl_a8683f55558dce7f1de4179ca6b95a97d}{\hyperlink{class_lib_u_s_b_1_1_transfer_impl_a8683f55558dce7f1de4179ca6b95a97d}{Transfer\-Impl} (std\-::weak\-\_\-ptr$<$ \hyperlink{class_lib_u_s_b_1_1_endpoint_impl}{Endpoint\-Impl} $>$ p\-Endpoint\-Impl)}\label{class_lib_u_s_b_1_1_transfer_impl_a8683f55558dce7f1de4179ca6b95a97d}

\begin{DoxyCompactList}\small\item\em Constructor. \end{DoxyCompactList}\item 
\hypertarget{class_lib_u_s_b_1_1_transfer_impl_a02458b7ba8887f7fbe096a686061deb2}{virtual \hyperlink{class_lib_u_s_b_1_1_transfer_impl_a02458b7ba8887f7fbe096a686061deb2}{$\sim$\-Transfer\-Impl} ()}\label{class_lib_u_s_b_1_1_transfer_impl_a02458b7ba8887f7fbe096a686061deb2}

\begin{DoxyCompactList}\small\item\em Destructor. \end{DoxyCompactList}\item 
\hypertarget{class_lib_u_s_b_1_1_transfer_impl_a9d0593fcc18ff8134d71e1e23cbd691b}{void \hyperlink{class_lib_u_s_b_1_1_transfer_impl_a9d0593fcc18ff8134d71e1e23cbd691b}{set\-Buffer} (std\-::shared\-\_\-ptr$<$ unsigned char $>$ p\-Transfer\-Buffer)}\label{class_lib_u_s_b_1_1_transfer_impl_a9d0593fcc18ff8134d71e1e23cbd691b}

\begin{DoxyCompactList}\small\item\em Set the transfer buffer. \end{DoxyCompactList}\item 
std\-::shared\-\_\-ptr$<$ unsigned char $>$ \hyperlink{class_lib_u_s_b_1_1_transfer_impl_a3fc5e1e955d1239ced2e15218f264d6f}{get\-Buffer} ()
\begin{DoxyCompactList}\small\item\em Returns the transfer buffer. \end{DoxyCompactList}\item 
\hypertarget{class_lib_u_s_b_1_1_transfer_impl_a06f675a9b88f4034082a4c40d91ec62c}{void \hyperlink{class_lib_u_s_b_1_1_transfer_impl_a06f675a9b88f4034082a4c40d91ec62c}{set\-Data\-Transfer\-Size} (size\-\_\-t transfer\-Bytes)}\label{class_lib_u_s_b_1_1_transfer_impl_a06f675a9b88f4034082a4c40d91ec62c}

\begin{DoxyCompactList}\small\item\em Sets the data transfer size. \end{DoxyCompactList}\item 
\hypertarget{class_lib_u_s_b_1_1_transfer_impl_afda763caf4ebfbe671b2918e8b2f2837}{size\-\_\-t \hyperlink{class_lib_u_s_b_1_1_transfer_impl_afda763caf4ebfbe671b2918e8b2f2837}{bytes\-Transferred} () const }\label{class_lib_u_s_b_1_1_transfer_impl_afda763caf4ebfbe671b2918e8b2f2837}

\begin{DoxyCompactList}\small\item\em Returns the number of bytes transferred. \end{DoxyCompactList}\item 
\hypertarget{class_lib_u_s_b_1_1_transfer_impl_a3f21548633b419cbabd9b688ee4158c2}{void \hyperlink{class_lib_u_s_b_1_1_transfer_impl_a3f21548633b419cbabd9b688ee4158c2}{init} (std\-::weak\-\_\-ptr$<$ \hyperlink{class_lib_u_s_b_1_1_transfer}{Transfer} $>$ p\-Transfer\-Parent)}\label{class_lib_u_s_b_1_1_transfer_impl_a3f21548633b419cbabd9b688ee4158c2}

\begin{DoxyCompactList}\small\item\em Initializes the pointer to the parent \hyperlink{class_lib_u_s_b_1_1_transfer}{Transfer} object. \end{DoxyCompactList}\item 
virtual void \hyperlink{class_lib_u_s_b_1_1_transfer_impl_a681db4685c4d332d89197bf8f8e7a475}{Start} ()
\item 
virtual void \hyperlink{class_lib_u_s_b_1_1_transfer_impl_a8cf0e98b071bea590bce1a6b21b42653}{Cancel} ()
\begin{DoxyCompactList}\small\item\em Start the transfer, with communication flags. \end{DoxyCompactList}\item 
\hypertarget{class_lib_u_s_b_1_1_transfer_impl_af3aaf7fb8c9fa1e42dc3f6b4d895ade7}{virtual void \hyperlink{class_lib_u_s_b_1_1_transfer_impl_af3aaf7fb8c9fa1e42dc3f6b4d895ade7}{Reset} ()}\label{class_lib_u_s_b_1_1_transfer_impl_af3aaf7fb8c9fa1e42dc3f6b4d895ade7}

\begin{DoxyCompactList}\small\item\em Resets the transfer for reuse. \end{DoxyCompactList}\item 
\hypertarget{class_lib_u_s_b_1_1_transfer_impl_a513bfb1ebc75a295d9db444c991a62b0}{bool \hyperlink{class_lib_u_s_b_1_1_transfer_impl_a513bfb1ebc75a295d9db444c991a62b0}{is\-Running} () const }\label{class_lib_u_s_b_1_1_transfer_impl_a513bfb1ebc75a295d9db444c991a62b0}

\begin{DoxyCompactList}\small\item\em Returns T\-R\-U\-E if the transfer is in progress. \end{DoxyCompactList}\item 
\hypertarget{class_lib_u_s_b_1_1_transfer_impl_a40ba91ea27ed8132860febec9e66df80}{bool \hyperlink{class_lib_u_s_b_1_1_transfer_impl_a40ba91ea27ed8132860febec9e66df80}{is\-Complete} () const }\label{class_lib_u_s_b_1_1_transfer_impl_a40ba91ea27ed8132860febec9e66df80}

\begin{DoxyCompactList}\small\item\em Returns T\-R\-U\-E if the transfer is complete. \end{DoxyCompactList}\item 
\hypertarget{class_lib_u_s_b_1_1_transfer_impl_af6a428e676c3193d85cb23b2dc088de5}{bool \hyperlink{class_lib_u_s_b_1_1_transfer_impl_af6a428e676c3193d85cb23b2dc088de5}{is\-Successful} () const }\label{class_lib_u_s_b_1_1_transfer_impl_af6a428e676c3193d85cb23b2dc088de5}

\begin{DoxyCompactList}\small\item\em Returns T\-R\-U\-E if completed successfully, throws pending exceptions. \end{DoxyCompactList}\item 
\hypertarget{class_lib_u_s_b_1_1_transfer_impl_a5313634c35953104525d6029fcc4971b}{Transfer\-Result\-\_\-t \hyperlink{class_lib_u_s_b_1_1_transfer_impl_a5313634c35953104525d6029fcc4971b}{Result} () const }\label{class_lib_u_s_b_1_1_transfer_impl_a5313634c35953104525d6029fcc4971b}

\begin{DoxyCompactList}\small\item\em Returns the results of the transfer. \end{DoxyCompactList}\item 
\hypertarget{class_lib_u_s_b_1_1_transfer_impl_aff9a9c6c22b8732de51860a630b92f1a}{void \hyperlink{class_lib_u_s_b_1_1_transfer_impl_aff9a9c6c22b8732de51860a630b92f1a}{set\-Timeout} (std\-::chrono\-::milliseconds timeout)}\label{class_lib_u_s_b_1_1_transfer_impl_aff9a9c6c22b8732de51860a630b92f1a}

\begin{DoxyCompactList}\small\item\em Set timeout. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{class_lib_u_s_b_1_1_transfer_impl_a9c6e59de55a7059694c10b66f9a7f5ca}{virtual void \hyperlink{class_lib_u_s_b_1_1_transfer_impl_a9c6e59de55a7059694c10b66f9a7f5ca}{Setup} ()=0}\label{class_lib_u_s_b_1_1_transfer_impl_a9c6e59de55a7059694c10b66f9a7f5ca}

\begin{DoxyCompactList}\small\item\em Fill the transfer object. \end{DoxyCompactList}\item 
\hypertarget{class_lib_u_s_b_1_1_transfer_impl_a2d3308de62990fa94de3298fd76e890b}{void \hyperlink{class_lib_u_s_b_1_1_transfer_impl_a2d3308de62990fa94de3298fd76e890b}{Alloc\-Transfer} (int iso\-\_\-packets=0)}\label{class_lib_u_s_b_1_1_transfer_impl_a2d3308de62990fa94de3298fd76e890b}

\begin{DoxyCompactList}\small\item\em Create libusb transfer struct. \end{DoxyCompactList}\item 
\hypertarget{class_lib_u_s_b_1_1_transfer_impl_ab79c5240da3b56fef940148ac8b5742f}{virtual void \hyperlink{class_lib_u_s_b_1_1_transfer_impl_ab79c5240da3b56fef940148ac8b5742f}{Notify\-Complete} ()}\label{class_lib_u_s_b_1_1_transfer_impl_ab79c5240da3b56fef940148ac8b5742f}

\begin{DoxyCompactList}\small\item\em Notifies the device that the usb transfer is completed. \end{DoxyCompactList}\item 
virtual void \hyperlink{class_lib_u_s_b_1_1_transfer_impl_a33ba7d60252435c304c56a82eb3d4680}{Handle\-Pending\-Exceptions} () const 
\begin{DoxyCompactList}\small\item\em Throws pending exceptions. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Static Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
static void \-\_\-\-\_\-stdcall \hyperlink{class_lib_u_s_b_1_1_transfer_impl_a7b64266d16c9d13679af8ede2e230e68}{Async\-Transfer\-Callback} (libusb\-\_\-transfer $\ast$p\-Transfer)
\begin{DoxyCompactList}\small\item\em Libusb asynchronous transfer callback function. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Protected Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{class_lib_u_s_b_1_1_transfer_impl_a8a9d3f1550a492dc0145312afbeec707}{unsigned int \hyperlink{class_lib_u_s_b_1_1_transfer_impl_a8a9d3f1550a492dc0145312afbeec707}{m\-\_\-\-Timeout}}\label{class_lib_u_s_b_1_1_transfer_impl_a8a9d3f1550a492dc0145312afbeec707}

\begin{DoxyCompactList}\small\item\em \hyperlink{class_lib_u_s_b_1_1_transfer}{Transfer} Timeout. \end{DoxyCompactList}\item 
\hypertarget{class_lib_u_s_b_1_1_transfer_impl_ada1f6067f13b351f0302d552baa8cbd0}{std\-::shared\-\_\-ptr$<$ unsigned char $>$ \hyperlink{class_lib_u_s_b_1_1_transfer_impl_ada1f6067f13b351f0302d552baa8cbd0}{m\-\_\-p\-Transfer\-Buffer}}\label{class_lib_u_s_b_1_1_transfer_impl_ada1f6067f13b351f0302d552baa8cbd0}

\begin{DoxyCompactList}\small\item\em \hyperlink{class_lib_u_s_b_1_1_transfer}{Transfer} buffer. \end{DoxyCompactList}\item 
\hypertarget{class_lib_u_s_b_1_1_transfer_impl_ad50c36c9ce47f0a8ea1a628e9d5a5c13}{size\-\_\-t \hyperlink{class_lib_u_s_b_1_1_transfer_impl_ad50c36c9ce47f0a8ea1a628e9d5a5c13}{m\-\_\-transfer\-Size}}\label{class_lib_u_s_b_1_1_transfer_impl_ad50c36c9ce47f0a8ea1a628e9d5a5c13}

\begin{DoxyCompactList}\small\item\em \hyperlink{class_lib_u_s_b_1_1_transfer}{Transfer} buffer size. \end{DoxyCompactList}\item 
\hypertarget{class_lib_u_s_b_1_1_transfer_impl_a5fdeade395d427c56b0b99c4faed3cd8}{std\-::shared\-\_\-ptr$<$ libusb\-\_\-transfer $>$ \hyperlink{class_lib_u_s_b_1_1_transfer_impl_a5fdeade395d427c56b0b99c4faed3cd8}{m\-\_\-p\-Transfer}}\label{class_lib_u_s_b_1_1_transfer_impl_a5fdeade395d427c56b0b99c4faed3cd8}

\begin{DoxyCompactList}\small\item\em \hyperlink{class_lib_u_s_b_1_1_lib_u_s_b}{Lib\-U\-S\-B} transfer struct. \end{DoxyCompactList}\item 
\hypertarget{class_lib_u_s_b_1_1_transfer_impl_a695a90ce73d8f5dd22fde28e0250fd16}{std\-::weak\-\_\-ptr$<$ \hyperlink{class_lib_u_s_b_1_1_endpoint_impl}{Endpoint\-Impl} $>$ \hyperlink{class_lib_u_s_b_1_1_transfer_impl_a695a90ce73d8f5dd22fde28e0250fd16}{m\-\_\-p\-Endpoint\-Impl}}\label{class_lib_u_s_b_1_1_transfer_impl_a695a90ce73d8f5dd22fde28e0250fd16}

\begin{DoxyCompactList}\small\item\em \hyperlink{class_lib_u_s_b_1_1_endpoint}{Endpoint} this transfer belongs to. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Base U\-S\-B \hyperlink{class_lib_u_s_b_1_1_transfer}{Transfer} implementation. 

\subsection{Member Function Documentation}
\hypertarget{class_lib_u_s_b_1_1_transfer_impl_a7b64266d16c9d13679af8ede2e230e68}{\index{Lib\-U\-S\-B\-::\-Transfer\-Impl@{Lib\-U\-S\-B\-::\-Transfer\-Impl}!Async\-Transfer\-Callback@{Async\-Transfer\-Callback}}
\index{Async\-Transfer\-Callback@{Async\-Transfer\-Callback}!LibUSB::TransferImpl@{Lib\-U\-S\-B\-::\-Transfer\-Impl}}
\subsubsection[{Async\-Transfer\-Callback}]{\setlength{\rightskip}{0pt plus 5cm}void Lib\-U\-S\-B\-::\-Transfer\-Impl\-::\-Async\-Transfer\-Callback (
\begin{DoxyParamCaption}
\item[{libusb\-\_\-transfer $\ast$}]{p\-Transfer}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}, {\ttfamily [protected]}}}\label{class_lib_u_s_b_1_1_transfer_impl_a7b64266d16c9d13679af8ede2e230e68}


Libusb asynchronous transfer callback function. 

Obtain the transfer's shared\-\_\-ptr \hypertarget{class_lib_u_s_b_1_1_transfer_impl_a8cf0e98b071bea590bce1a6b21b42653}{\index{Lib\-U\-S\-B\-::\-Transfer\-Impl@{Lib\-U\-S\-B\-::\-Transfer\-Impl}!Cancel@{Cancel}}
\index{Cancel@{Cancel}!LibUSB::TransferImpl@{Lib\-U\-S\-B\-::\-Transfer\-Impl}}
\subsubsection[{Cancel}]{\setlength{\rightskip}{0pt plus 5cm}void Lib\-U\-S\-B\-::\-Transfer\-Impl\-::\-Cancel (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [virtual]}}}\label{class_lib_u_s_b_1_1_transfer_impl_a8cf0e98b071bea590bce1a6b21b42653}


Start the transfer, with communication flags. 

Cancel the transfer \hypertarget{class_lib_u_s_b_1_1_transfer_impl_a3fc5e1e955d1239ced2e15218f264d6f}{\index{Lib\-U\-S\-B\-::\-Transfer\-Impl@{Lib\-U\-S\-B\-::\-Transfer\-Impl}!get\-Buffer@{get\-Buffer}}
\index{get\-Buffer@{get\-Buffer}!LibUSB::TransferImpl@{Lib\-U\-S\-B\-::\-Transfer\-Impl}}
\subsubsection[{get\-Buffer}]{\setlength{\rightskip}{0pt plus 5cm}std\-::shared\-\_\-ptr$<$ unsigned char $>$ Lib\-U\-S\-B\-::\-Transfer\-Impl\-::get\-Buffer (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{class_lib_u_s_b_1_1_transfer_impl_a3fc5e1e955d1239ced2e15218f264d6f}


Returns the transfer buffer. 

\begin{DoxyRefDesc}{Todo}
\item[\hyperlink{todo__todo000005}{Todo}]Operation must be complete. \end{DoxyRefDesc}
\hypertarget{class_lib_u_s_b_1_1_transfer_impl_a33ba7d60252435c304c56a82eb3d4680}{\index{Lib\-U\-S\-B\-::\-Transfer\-Impl@{Lib\-U\-S\-B\-::\-Transfer\-Impl}!Handle\-Pending\-Exceptions@{Handle\-Pending\-Exceptions}}
\index{Handle\-Pending\-Exceptions@{Handle\-Pending\-Exceptions}!LibUSB::TransferImpl@{Lib\-U\-S\-B\-::\-Transfer\-Impl}}
\subsubsection[{Handle\-Pending\-Exceptions}]{\setlength{\rightskip}{0pt plus 5cm}void Lib\-U\-S\-B\-::\-Transfer\-Impl\-::\-Handle\-Pending\-Exceptions (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [protected]}, {\ttfamily [virtual]}}}\label{class_lib_u_s_b_1_1_transfer_impl_a33ba7d60252435c304c56a82eb3d4680}


Throws pending exceptions. 

\begin{DoxyRefDesc}{Todo}
\item[\hyperlink{todo__todo000006}{Todo}]Add optional/configurable exceptions \end{DoxyRefDesc}


\begin{DoxyRefDesc}{Todo}
\item[\hyperlink{todo__todo000007}{Todo}]Add optional/configurable exceptions \end{DoxyRefDesc}


\begin{DoxyRefDesc}{Todo}
\item[\hyperlink{todo__todo000008}{Todo}]Add optional/configurable exceptions \end{DoxyRefDesc}


\begin{DoxyRefDesc}{Todo}
\item[\hyperlink{todo__todo000009}{Todo}]create a custom exception class for \char`\"{}\-No device\char`\"{} \end{DoxyRefDesc}


\begin{DoxyRefDesc}{Todo}
\item[\hyperlink{todo__todo000010}{Todo}]Add custom exception for overflow conditions. \end{DoxyRefDesc}
\hypertarget{class_lib_u_s_b_1_1_transfer_impl_a681db4685c4d332d89197bf8f8e7a475}{\index{Lib\-U\-S\-B\-::\-Transfer\-Impl@{Lib\-U\-S\-B\-::\-Transfer\-Impl}!Start@{Start}}
\index{Start@{Start}!LibUSB::TransferImpl@{Lib\-U\-S\-B\-::\-Transfer\-Impl}}
\subsubsection[{Start}]{\setlength{\rightskip}{0pt plus 5cm}void Lib\-U\-S\-B\-::\-Transfer\-Impl\-::\-Start (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [virtual]}}}\label{class_lib_u_s_b_1_1_transfer_impl_a681db4685c4d332d89197bf8f8e7a475}
Start the transfer \begin{DoxyRefDesc}{Todo}
\item[\hyperlink{todo__todo000012}{Todo}]Add timeout support. \end{DoxyRefDesc}


The documentation for this class was generated from the following files\-:\begin{DoxyCompactItemize}
\item 
src/Transfer\-Impl.\-h\item 
src/Transfer\-Impl.\-cpp\end{DoxyCompactItemize}
